package com.senney.nio;

import java.nio.ByteBuffer;

/**
 * @Author lanmengye@outlook.com
 * @Date 2020/12/29 22:24
 */
public class ByteBufferPutGet {
    public static void main(String[] args) {
        ByteBuffer buffer = ByteBuffer.allocate(64);

        buffer.putInt(12);
        buffer.putChar('a');

        buffer.flip();
        System.out.println(buffer.getInt());
        System.out.println(buffer.getLong());
    }
}
